1 package com.inigoserrano.isvalidator.alfa.okDo;
2
3 import com.inigoserrano.isvalidator.alfa.formModel.TextField;
4 import com.inigoserrano.isvalidator.okDo.OkDoInternalException;
5 import com.inigoserrano.isvalidator.okDo.SimpleOkDo;
6
7 /***
8 * Here the description of the class
9 *
10 * @license@
11 *
12 * @version @version@
13 * @author @author@
14 **/
15 public class SimpleTextFieldOkDo extends SimpleOkDo {
16 /***
17 * Comentario de constructor SimpleTextFieldValidConstraintProcesor.
18 **/
19 public SimpleTextFieldOkDo() {
20 super();
21 }
22
23 /***
24 * Comentario de método execute.
25 **/
26 public String execute() throws OkDoInternalException {
27 TextField textField = (TextField) this.contraint;
28 String response = "";
29 response += "<!-- ISValidator: Automatic generation of TextField -->"
30 + "\n";
31 response += "<table border=\"0\" cellspacing=\"0\" width=\"100%\">"
32 + "\n";
33 response += " <tr>" + "\n";
34 response += " <td width=\"50%\" class=\"tituloCampo\">"
35 + textField.getTitle()
36 + "</td>"
37 + "\n";
38 response += " <td class=\"campo\"><input type=\"text\" name=\""
39 + textField.getParameterName()
40 + "\"";
41 if (textField.getValueToCheck() != null) {
42 response += " value=\"" + textField.getValueToCheck() + "\"";
43 } else if (textField.getValueToCheck() != null) {
44 response += " value=\"" + textField.getValueToCheck() + "\"";
45 }
46 if (textField.getSize() > 0) {
47 response += " size=\"" + textField.getSize() + "\" ";
48 }
49 if (textField.getMaxLong() > 0) {
50 response += " maxlength=\"" + textField.getMaxLong() + "\" ";
51 }
52 response += "> </td></tr>" + "\n";
53 //Si no hay mensaje de error o de ayuda no muestro la celda vacía
54 if (textField.getHelpDescripcion() != null) {
55 response += " <tr>";
56 response += " <td colspan=\"2\" class=\"descripcionAyuda\">"
57 + textField.getHelpDescripcion()
58 + "</td>"
59 + "\n";
60 response += " </tr>";
61 }
62 response += "</table>" + "\n";
63 response += "<!-- End of Automatic generation of TextField -->" + "\n";
64 response += "<br>" + "\n";
65 return response;
66 }
67 }
This page was automatically generated by Maven